package com.lhf.novel.util;

/**
 * <p>错误状态码</p>
 *
 * @author zy 刘会发
 * @since 2020/3/12
 */
public enum ExceptionCode {
    SUCCESS(2000, "请求成功"),
    FAILED(5000, "服务端异常"),
    NOT_NULL(4000, "参数不能为空"),
    USER_IS_NULL(4001, "用户不存在"),
    PASSWORD_ERROR(4002, "用户名或密码错误"),
    USER_LOCKED(5001, "用户被锁定"),
    USER_EXPIRATION(4003, "用户过期"),
    UN_LOGIN(4004, "用户未登录"),
    UN_PER(4005, "未授权"),
    PARAMS_ERROR(4006, "参数异常");

    private int code;
    private String mes;

    ExceptionCode(int code, String mes) {
        this.code = code;
        this.mes = mes;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMes() {
        return mes;
    }

    public void setMes(String mes) {
        this.mes = mes;
    }
}
